package com.winning.shiro.factory;

import java.util.LinkedHashMap;

/**
 * @author Lenovo
 * @title
 * @project shiro-web
 * @package com.winning.shiro
 * @date: 2019-01-21 17:43
 */
public class FilterChainDefinitionsMapFactoryBuilder {

    public LinkedHashMap<String,String> filterChainDefinitionsMapBuilder(){
        LinkedHashMap<String,String> map = new LinkedHashMap<>();
         map.put("/","anon");
         map.put("/login.jsp","anon");
         map.put("/shiro/login","anon");
         map.put("/shiro/logout","logout");
         map.put("/user/**","authc");
         map.put("/admin/**","authc");
         map.put("/user.jsp","roles[user]");
         map.put("/admin.jsp","roles[admin]");
         map.put("/**","authc");
        return map;
    }
}
